package com.hope4cc.service.Impl;

import com.hope4cc.dao.AccountDao;
import com.hope4cc.entity.Account;
import com.hope4cc.service.AccountService;

import java.sql.SQLException;

/**
 * 文件名：AccoutServiceImpl
 * 创建者：hope
 * 邮箱：1602774287@qq.com
 * 微信：hope4cc
 * 创建时间：2022/10/6-16:30
 * 描述：
 */
public class AccountServiceImpl implements AccountService {

    private AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }



    @Override
    public int addAccount(Account account) throws SQLException {
       return accountDao.addAccount(account);
    }

    @Override
    public int deleteAccount(Integer id) throws SQLException {
        return accountDao.deleteAccount(id);
    }

    @Override
    public int updateAccount(Account account) throws SQLException {
       return accountDao.updateAccount(account);
    }

    @Override
    public Account selectAccountById(Integer id) throws SQLException {
        return accountDao.selectAccountById(id);
    }
}
